package bg.btanev.eightyfour.shared.command.person;

import bg.btanev.eightyfour.shared.command.CommandInput;
import bg.btanev.eightyfour.shared.dto.person.PersonDto;

/**
 *
 * @author B.Tanev
 *
 */
public class UpdatePersonInput implements CommandInput {
	private PersonDto person;

	public PersonDto getPerson() {
		return person;
	}

	public void setPerson(PersonDto person) {
		this.person = person;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((person == null) ? 0 : person.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UpdatePersonInput other = (UpdatePersonInput) obj;
		if (person == null) {
			if (other.person != null)
				return false;
		} else if (!person.equals(other.person))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "UpdatePersonInput [person=" + person + "]";
	}
}
